package com.rc.saas.tenant.model.tenant;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.rc.saas.tenant.base.BaseModel;

import java.util.Date;
import java.util.List;

public class TenantRole extends BaseModel {
    @ExcelIgnore
    private Long tenantRoleId;

    @ExcelIgnore
    private String tenantCode;

    @ExcelProperty(value = "角色名称",index = 0)
    private String roleName;

    @ExcelIgnore
    private String roleCode;

    /**
     * 角色类型 ( 0 超级管理员 1 普通用户 2加盟商 3企业用户) 默认1`
     */
    @ExcelIgnore
    private String roleType;

    /**
     * 数据权限 100 平台权限, 010 加盟商权限,001企业权限,111全部权限 默认111 不能为000
     */
    @ExcelIgnore
    private String dataAuth;

    @ExcelProperty(value = "说明",index = 1)
    private String remarks;

    @ExcelProperty(value = "状态",index = 2, converter = TenantStatusConverter.class)
    private String status;

    @ExcelIgnore
    private Long sort;

    @ExcelProperty(value = "创建人",index = 3)
    private String createdBy;

    @ExcelProperty(value = "创建时间",index = 4)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @ExcelIgnore
    private String lastUpdatedBy;

    @ExcelIgnore
    private Date lastUpdatedTime;


    //扩展属性
    @ExcelIgnore
    private List<Long> menuIds;

    @ExcelIgnore
    private TenantMenu joinMenu;

    public Long getTenantRoleId() {
        return tenantRoleId;
    }

    public void setTenantRoleId(Long tenantRoleId) {
        this.tenantRoleId = tenantRoleId;
    }

    public String getTenantCode() {
        return tenantCode;
    }

    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getRoleType() {
        return roleType;
    }

    public void setRoleType(String roleType) {
        this.roleType = roleType;
    }

    public String getDataAuth() {
        return dataAuth;
    }

    public void setDataAuth(String dataAuth) {
        this.dataAuth = dataAuth;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public String getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public void setLastUpdatedBy(String lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public Date getLastUpdatedTime() {
        return lastUpdatedTime;
    }

    public void setLastUpdatedTime(Date lastUpdatedTime) {
        this.lastUpdatedTime = lastUpdatedTime;
    }

    public List<Long> getMenuIds() {
        return menuIds;
    }

    public void setMenuIds(List<Long> menuIds) {
        this.menuIds = menuIds;
    }

    public TenantMenu getJoinMenu() {
        return joinMenu;
    }

    public void setJoinMenu(TenantMenu joinMenu) {
        this.joinMenu = joinMenu;
    }
}